from rest_framework import serializers

# from apps.goods.models import GoodsVisitCount
from goods.models import GoodsVisitCount


class GoodsDayserializer(serializers.ModelSerializer):
    # 嵌套，指定返回分类名称
    category = serializers.StringRelatedField (read_only=True)

    class  Meta:
        model= GoodsVisitCount
        fields = ('count', 'category')



